<% title = admin.t("titles.new", default: "New %{model_name}") %>

<% content_for(:title, title) %>
<% breadcrumb(title) %>

<% toolbar(:primary) do |t| %>
  <%= t.save_or_dismiss(:create) %>
  <%= hook("new.toolbar.primary", t) %>
<% end %>

<% toolbar(:secondary) do |t| %>
  <%= hook("new.toolbar.secondary", t) %>
<% end %>

<%= resource_turbo_frame(instance) do %>
  <%= trestle_form_for instance, url: admin.path(:create), method: :post do |f| %>
    <%= render partial: "form", layout: modal_request? ? "modal" : "layout", locals: { wrapper: admin.form.wrapper? } %>
  <% end %>
<% end %>
